function positionedCode(parentData, childData, childCode) {
    let code = '';
    let childLeft = childData.x - parentData.x;
    let childTop = childData.y - parentData.y;
    let childRight = parentData.x + parentData.width - childData.x - childData.width;
    let childBottom = parentData.y + parentData.height - childData.y - childData.height;

    let horizon, vertical;
    if (directionalSupport) {
        code = `
        PositionedDirectional`;
        if (childLeft > childRight) {
            horizon = `end: ${unit(childRight)}`;
        } else {
            horizon = `start: ${unit(childLeft)}`;
        }
        if (childTop > childBottom) {
            vertical = `bottom: ${unit(childBottom)}`;
        } else {
            vertical = `top: ${unit(childTop)}`;
        }
    } else {
        code = `Positioned`;
        if (childLeft > childRight) {
            horizon = `right: ${unit(childRight)}`;
        } else {
            horizon = `left: ${unit(childLeft)}`;
        }
        if (childTop > childBottom) {
            vertical = `bottom: ${unit(childBottom)}`;
        } else {
            vertical = `top: ${unit(childTop)}`;
        }
    }

    code += `(
                ${horizon},
                ${vertical},
                child: ${childCode},
            ),
        `;
    return code;
}